Geo searching is a way to search around a specific location or area and rank results based on their distance.
_geoloc
attribute that contains latitude and longitude (lat
and lng
properties). The coordinates must be numbers, not strings.
Here’s an example of a record with one geolocation:
aroundRadius
or minimumAroundRadius
. This override only applies to radius-based searches, not area-based ones like rectangles and polygons.
aroundRadius
parameter to all
. This means your records are ordered but not restricted based on distance from a provided point.
lat
and lng
of a bounding shape in the search parameters. The engine excludes all results outside of the shape.
Filtering within or around an area doesn’t affect the ranking of results. Additionally, area-based geo-searching doesn’t work in combination with radius-based geo-searching. When filtering on rectangular or polygonal areas, the engine considers all results within the area as being geographically equal.
insideBoundingBox
and insidePolygon
together. If you provide both, only insideBoundingBox
actions will run.insideBoundingBox
takes precedence, you’ll only see blue pins on the map.
For this reason, using a mix of bounding boxes and polygons isn’t recommended.
lat
/ lng
you provided, the higher it ranks in the results.
Geo
criterion in the ranking formulaGeo
criterion, which by default is the second-ranking criterion. This criterion is only meaningful when records contain the _geoloc
attribute with the corresponding lat
and lng
properties.
geo
criterion’s precision setting to alter the default.